<?php
namespace api\modules\v1\controllers;

use Yii;
use common\core\base\BaseApiController;
use common\modules\taxonomy\models\search\TaxonomySearch;

/**
 * Class TaxonomyController
 *
 * @author Xuegui Yuan <yuanxuegui@163.com>
 */
class TaxonomyController extends BaseApiController
{

    /**
     * @inheritdoc
     *
     * @var string
     */
    public $modelClass = 'api\modules\v1\resources\Taxonomy';

    /**
     * @inheritdoc
     * @var bool
     */
    public $needLogin = false;
    
    /**
     * Lists all TaxonomyCategory models.
     * @return mixed
     */
    public function actionIndex()
    {
        $searchModel = new TaxonomySearch();
        $dataProvider = $searchModel->search(Yii::$app->request->queryParams, '');
    
        return $dataProvider;
    }
}